//
// Decompiled by Jadx - 357ms
//
package s;

import android.app.Activity;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.activity.b;
import androidx.appcompat.app.t;
import androidx.constraintlayout.widget.i;
import cc.e;
import fh.a;
import fi.w;
import fi.y;
import me.plusne.common.Http.Home;
import r.f;
import r.g;

public final class p implements View.OnClickListener {
    public final Activity a;
    public final w b;
    public final e c;

    public p(Activity activity) {
        this.a = activity;
        View inflate = LayoutInflater.from(activity).inflate(-2113142728, (ViewGroup) null, false);
        int i = 0x7f820098;
        TextView textView = (TextView) i.cg(0x7f820098, inflate);
        if (textView != null) {
            i = 0x7f82009f;
            TextView textView2 = (TextView) i.cg(0x7f82009f, inflate);
            if (textView2 != null) {
                i = 0x7f8200a0;
                TextView textView3 = (TextView) i.cg(0x7f8200a0, inflate);
                if (textView3 != null) {
                    i = 0x7f820185;
                    EditText editText = (EditText) i.cg(0x7f820185, inflate);
                    if (editText != null) {
                        i = 0x7f820186;
                        EditText editText2 = (EditText) i.cg(0x7f820186, inflate);
                        if (editText2 != null) {
                            i = 0x7f820187;
                            EditText editText3 = (EditText) i.cg(0x7f820187, inflate);
                            if (editText3 != null) {
                                i = 0x7f820188;
                                EditText editText4 = (EditText) i.cg(0x7f820188, inflate);
                                if (editText4 != null) {
                                    i = 0x7f820189;
                                    EditText editText5 = (EditText) i.cg(0x7f820189, inflate);
                                    if (editText5 != null) {
                                        LinearLayout linearLayout = (LinearLayout) inflate;
                                        this.c = new e(linearLayout, textView, textView2, textView3, editText, editText2, editText3, editText4, editText5);
                                        w wVar = new w(activity);
                                        wVar.bj(fi.e.VIEW);
                                        wVar.ar = linearLayout;
                                        wVar.bk();
                                        this.b = wVar;
                                        wVar.ar = linearLayout;
                                        textView3.setText("账号注册");
                                        float f = 25;
                                        r.e.d(-2113535899, f, editText5);
                                        r.e.d(-2113535899, f, editText2);
                                        r.e.d(-2113535899, f, editText3);
                                        r.e.d(-2113535899, f, editText4);
                                        r.e.d(-2113535899, f, editText);
                                        r.e.d(-2113535903, f, textView2);
                                        r.e.d(-2113535903, f, textView);
                                        editText5.setHint("模块登录账号");
                                        editText2.setHint("模块登录密码");
                                        editText3.setHint("您的QQ号,进群需要验证QQ");
                                        editText.setHint("邮箱地址,接收注册验证码");
                                        editText4.setHint("介绍人帐号(非必须)");
                                        textView.setText("取消");
                                        textView.setOnClickListener(new a(8, this));
                                        textView2.setText("注册");
                                        textView2.setOnClickListener(this);
                                        return;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i)));
    }

    @Override
    public final void onClick(View view) {
        f p;
        String str;
        e eVar = this.c;
        boolean s = g.s(((EditText) eVar.e).getText().toString());
        Activity activity = this.a;
        if (!s) {
            p = b.p(activity);
            p.d = 48;
            str = "账号格式错误,6-16位数字或者字母";
        } else {
            EditText editText = eVar.b;
            if (!g.s(editText.getText().toString())) {
                p = b.p(activity);
                p.d = 48;
                str = "密码格式错误,6-16位数字或者字母";
            } else {
                View view2 = eVar.c;
                if (!g.g(((EditText) view2).getText().toString())) {
                    p = b.p(activity);
                    p.d = 48;
                    str = "QQ号为5-12位纯数字";
                } else {
                    EditText editText2 = eVar.a;
                    if (TextUtils.isEmpty(editText2.getText().toString())) {
                        p = b.p(activity);
                        p.d = 48;
                        str = "请填写注册邮箱地址";
                    } else {
                        y.f(activity, "发送验证码...");
                        String obj = ((EditText) eVar.e).getText().toString();
                        String obj2 = editText.getText().toString();
                        String obj3 = editText2.getText().toString();
                        String obj4 = ((EditText) view2).getText().toString();
                        String obj5 = ((EditText) eVar.d).getText().toString();
                        t.c().j(((Home) dq.b.b(Home.class)).sendCodeNew(obj, obj2, obj3, obj4, obj5).subscribeWith(new a(this, activity)));
                        return;
                    }
                }
            }
        }
        p.l(str);
    }
}
